$().ready(function() {
	// autoComplete
		$("#keyword").autocomplete(context + "/search/matter/ajaxautocomplete/", {
			minChars : 1,
			matchContains : false,
			matchSubset : 1,
			mustMatch : false,
			multiple : false,
			autoFill : false,
			scroll : false,
			dataType : "json",
			parse : function(data) {
				return $.map(data, function(row) {
					return {
						data : row,
						value : row.keyword,
						result : row.keyword
					}
				});
			},
			formatItem : function(row, i, max) {
				return '<div class="dropList">' + row.keyword + '</div>';
			}
		});
		// form
		$("#submit").click(
				function() {
					var keyword = $("#keyword").attr("value");
					window.location.href = context + "/search/view/" + keyword
							+ "-0-10";
				});
	});